﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using System.Data.OleDb;

namespace qlsv
{
    class data
    {
        public static string chuoiketnoi
        {
            get
            {
                //Nếu tập tin App.config dùng AppSettings
                return ConfigurationManager.AppSettings["olecn"].ToString();
            }
        }

        public static DataTable getData(string sql)
        {
            OleDbConnection con = new OleDbConnection(chuoiketnoi);
            OleDbDataAdapter da = new OleDbDataAdapter(sql, con);
            DataTable dt = new DataTable();
            da.Fill(dt);
            return dt;
        }

    }
}
